package com.shop.dao;

import com.shop.bean.Category;
import com.shop.bean.Product_images;
import com.shop.util.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


//springboot 提供的标注数据访问层实现的类
@Mapper
public interface CategoryDao {
    //@Param("category")添加别名
    int addCategory(@Param("category") Category category);

    int deleteCategory(@Param("id") int id);
    int editCategory(@Param("category") Category category);
    //查询一个
    Category getCategoryById(@Param("id") int id);
    //查询多个
    List<Category> selectCategories(@Param("page") Page page, @Param("text") String text);
    //查询子分类
    List<Category> getChildren(@Param("id") int id);
    int getCount(@Param("text") String text);


}